package com.boot.mgt.utils

import java.time.LocalDate
import java.time.Period

/**
 * @author rankai on 2018/3/22.
 */
val Int.days: Period
    get() = Period.ofDays(this)

val Period.ago: LocalDate
    get() = LocalDate.now() - this

val Period.fromNow: LocalDate
    get() = LocalDate.now() + this